package org.ttitfly.ttcore.web.account;

import java.util.List;

import org.ttitfly.ttcore.entity.account.Resource;
import org.ttitfly.ttcore.service.account.ResourceManager;
import org.ttitfly.ttcore.so.account.ResourceSO;
import org.ttitfly.ttcore.util.query.PageList;

public class ResourcePageList extends PageList<ResourceSO>  {

	@javax.annotation.Resource
	private ResourceManager resourceManager;
	
	public ResourcePageList(ResourceSO so, ResourceManager resourceManager) {
	      super(so);
	      this.resourceManager = resourceManager;
	}

	@Override
    protected int getObjectCount() {
        return resourceManager.getSOResourceViewCount(so);
    }

    @Override
    protected List<Resource> getObjectList() {
        return resourceManager.getSOResourceView(so);
    }

	public ResourceManager getResourceManager() {
		return resourceManager;
	}

	public void setResourceManager(ResourceManager resourceManager) {
		this.resourceManager = resourceManager;
	}
    
	
}
